package com.biyao.controller.report;

import com.biyao.schedulingcommon.response.BaseMsg;
import com.biyao.schedulingcommon.response.SuccessMsg;
import com.biyao.service.model.report.RollerReportMessage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(tags = {"轧辊报告"})
@RestController
@RequestMapping("/rollerReport")
public class RollerProfileReport {
    @Autowired
    private RollerReportMessage rollerReportMessage;

    @ApiOperation(value = "饼状图")
    @GetMapping("/profile")
    public BaseMsg profile() {
        return new SuccessMsg(rollerReportMessage.selectRollerProfile());
    }

    @ApiOperation("/轧辊详情")
    @GetMapping("/rollerDetail")
    public BaseMsg detail() {
        return new SuccessMsg(rollerReportMessage.getRollerDetailReport());
    }


    @ApiOperation("/轴承座详情")
    @GetMapping("bearingBoxDetail")
    public BaseMsg bearingBoxDetail() {
        return new SuccessMsg(rollerReportMessage.selectBearingBoxDetail());
    }

    @ApiOperation("/轴承座报告")
    @GetMapping("/bearingBox")
    public BaseMsg bearingBox() {
        return new SuccessMsg(rollerReportMessage.selectBearingBox());
    }

    @ApiOperation("/轴承报告")
    @GetMapping("/bearing")
    public BaseMsg bearing() {
        return new SuccessMsg(rollerReportMessage.selectBearing());
    }


}
